/**
 * $Id: Rfc2812.cs 77 2004-09-19 13:31:53Z meebey $
 * $URL: svn://svn.qnetp.net/smartirc/IrcClient/tags/0.2.0/src/Rfc2812.cs $
 * $Rev: 77 $
 * $Author: meebey $
 * $Date: 2004-09-19 15:31:53 +0200 (Sun, 19 Sep 2004) $
 *
 * Copyright (c) 2003 Mirco 'meebey' Bauer <mail@meebey.net> <http://www.meebey.net>
 * 
 * Full LGPL License: <http://www.gnu.org/licenses/lgpl.txt>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace UrDnd.IrcClient
{
	/// <summary>
	///
	/// </summary>
	public static class Rfc2812
	{
		public static string Pong(string data)
		{
			return string.Format("PONG :{0}", data);
		}

		public static string Pass(string password)
		{
			return string.Format("PASS {0}",password);
		}
		
		public static string Nick(string nickname)
		{
			return string.Format("NICK {0}", nickname);
		}
		
		public static string User(string username, int usermode, string realname)
		{
			return string.Format("User {0} {1} * :{2}", username, usermode, realname);
		}

		public static string Privmsg(string destination, string message)
		{
			return string.Format("PRIVMSG {0} :{1}", destination, message);
		}

		public static string Notice(string destination, string message)
		{
			return string.Format("NOTICE {0} :{1}", destination, message);
		}

		public static string Join(string channel)
		{
			return string.Format("JOIN {0}", channel);
		}

		public static string Part(string channel)
		{
			return string.Format("PART {0}", channel);
		}

		public static string Part(string channel, string reason)
		{
			return string.Format("PART {0} :{1}", channel, reason);
		}

		public static string Kick(string channel, string nickname)
		{
			return string.Format("KICK {0} {1}", channel, nickname);
		}

		public static string Kick(string channel, string nickname, string reason)
		{
			return string.Format("KICK {0} {1} :{2}", channel, nickname, reason);
		}

		public static string List()
		{
			return "LIST";
		}

		public static string List(string channel)
		{
			return string.Format("LIST {0}", channel);
		}

		public static string Names()
		{
			return "NAMES";
		}

		public static string Names(string channel)
		{
			return string.Format("NAMES {0}", channel);
		}

		public static string Topic(string channel)
		{
			return string.Format("TOPIC {0}", channel);
		}

		public static string Topic(string channel, string newtopic)
		{
			return string.Format("TOPIC {0} :{1}", channel, newtopic);
		}

		public static string Mode(string target)
		{
			return string.Format("MODE {0}", target);
		}

		public static string Mode(string target, string newmode)
		{
			return string.Format("MODE {0} {1}", target, newmode);
		}

		public static string Invite(string nickname, string channel)
		{
			return string.Format("INVITE {0} {1}", nickname, channel);
		}

		public static string Who(string target)
		{
			return string.Format("WHO {0}", target);
		}

		public static string Whois(string target)
		{
			return string.Format("WHOIS {0}", target);
		}

		public static string Whowas(string target)
		{
			return string.Format("WHOWAS {0}", target);
		}

		public static string Quit()
		{
			return "QUIT";
		}

		public static string Quit(string reason)
		{
			return string.Format("QUIT :{0}", reason);
		}
	}
}
